get a character from a string